<% # The following is used when the browser doesn't have javascript enabled %>
<% eval("#{Inflector.underscore(@scaffold_class)} = row") %>
<% classAttr = cycle("", "class=\"even\"") %>
<% @options = params.merge(:controller => @scaffold_controller, :action => "view", :id => row.send("#{@scaffold_class.primary_key}")) %>

<tr <%= classAttr %> id="<%= element_row_id(@options) %>" <%= "style=\"display: none;\"" if hidden %>>
	<% for scaffold_column in @scaffold_columns %>
	  <% column_value = eval(scaffold_column.eval) rescue nil %>
	  <% if show_totals_for_column?(scaffold_column.name) %>
	  	<% scaffold_column.add_to_total(column_value) %>
	  <% end %>
	  <td class="<%= column_class(scaffold_column.name, column_value, current_sort(params), scaffold_column.class_name) %>" >
	    <%= format_column(column_value, scaffold_column.sanitize?) %>
	  </td>
	<% end %>
  <% unless @no_edit && @no_delete %>
  <td class="actions">
    <table cellpadding="0" cellspacing="0">
      <tr>
        <td class="indicator-container">
          <%= loading_indicator_tag(@options) %>
        </td>
        <% unless @no_edit %>
          <td>
            <% edit_options = @options.merge(:action => 'edit'+@suffix) %>
 	          <%= link_to_remote "Editar",
   	                      { :url => edit_options,
                            :loading => "Element.show('#{loading_indicator_id(@options)}');" },
   	                      { :href => url_for(edit_options) } %>
   	      </td>
        <% end %>
        <% unless @no_delete %>
   	      <td>
   	         <% delete_options = @options.merge(:action => 'destroy'+@suffix) %>
 	           <%= link_to_remote "Excluir",
   	                      { :url => delete_options,
   	                        :confirm => 'Tem certeza que deseja excluir o registro ?',
                            :loading => "Element.show('#{loading_indicator_id(@options)}');" },
   	                      { :href => url_for( delete_options ) } %>
   	      </td>
        <% end %>
   	    </tr>
   	  </table>
  </td>
  <% end %>
</tr>
